using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
public class PickupGravity : MonoBehaviour
{
    public float speed = 0.6f;

    private void OnTriggerEnter2D(Collider2D collision)
    {
        ResourcePickup pickup = collision.gameObject.GetComponent<ResourcePickup>();
        if (pickup){
            pickup.transform.DOMove(transform.position, speed);
        }
    }
}
